package vip.xiaonuo.modular.front.blogcategory;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import vip.xiaonuo.core.pojo.response.ResponseData;
import vip.xiaonuo.core.pojo.response.SuccessResponseData;
import vip.xiaonuo.modular.blogcategory.entity.BlogCategory;
import vip.xiaonuo.modular.blogcategory.param.BlogCategoryParam;
import vip.xiaonuo.modular.blogcategory.service.BlogCategoryService;
import vip.xiaonuo.modular.blogcomment.param.BlogCommentParam;
import vip.xiaonuo.modular.blogtag.entity.BlogTag;
import vip.xiaonuo.sys.modular.consts.service.SysConfigService;

import javax.annotation.Resource;
import java.util.List;

/**
 * @author liu
 */
@RestController
@RequestMapping("/front/blogCategory")
public class FrontBlogCategoryController {
    @Resource
    private BlogCategoryService blogCategoryService;
    @GetMapping("/list")
    public ResponseData list(BlogCategoryParam blogCategoryParam) {
        QueryWrapper<BlogCategory> queryWrapper = new QueryWrapper<>();
        queryWrapper.lambda().select(BlogCategory::getCategoryName);
        return new SuccessResponseData(blogCategoryService.list(queryWrapper));
    }
}
